from utils.rules import check_rules

class EvaluatorAgent:
    def __init__(self, benchmark):
        self.benchmark = benchmark

    def evaluate(self, retrieval):
        rule_score, rule_feedback = check_rules(retrieval)
        recall, precision = 0.8, 0.85  # 可用真实数据替换
        score = (rule_score + recall + precision) / 3
        feedback = f"{rule_feedback} | 查全率: {recall}, 查准率: {precision}"
        return score, feedback